﻿
using ValidationEngine.Commons.Enums;
using ValidationEngine.Commons.Interfaces;
namespace ValidationEngine.Commons
{
    /// <summary>
    /// Validation rule interface
    /// </summary>
    public interface IValidationRule
    {
        /// <summary>
        /// Applies rule logic to model
        /// </summary>
        /// <param name="ctx"></param>
        /// <returns></returns>
        IValidationInfo Apply(IValidationContext ctx);

        /// <summary>
        /// Context describes when to apply the rule
        /// </summary>
        RuleApplingContext ApplingContext { get; set; }
    }
}
